package com.youxin.busfoundation.enums;

import net.bytebuddy.dynamic.DynamicType.Builder.MethodDefinition.ParameterDefinition.Initial;

/**
 * 线索跟进状态
 * @author yingde.cao
 *
 */
public enum FollowLeadsStatus {	
	InitStatus((short)0,""),
	/**
	 * 未跟进
	 */
	UnFollow((short)1,"未认领"),
	/**
	 * 跟进中
	 */
	Flollowing((short)2,"跟进中"),
	/**
	 * 有意向
	 */
	HaveIntention((short)3,"有意向"),
	/** 
	 * 已成交
	 */
	DealDone((short)4,"已成交")
	;

	public short getValue() {
		return value;
	}
	
	private String name;
	
	private short value;
	private FollowLeadsStatus(short value,String name) {
		this.value = value;
		this.name=name;
	}
	
	
	
	public String getName() {
		return name;
	}



	public void setName(String name) {
		this.name = name;
	}



	public void setValue(short value) {
		this.value = value;
	}


	public static FollowLeadsStatus valueOf(short val)
	{			
		for(FollowLeadsStatus m : FollowLeadsStatus.values()) 
		{
			if(val==m.getValue())
				return m;
	    }
		return InitStatus;
	}
	
	public static String stringValue(Short val)
	{
		if(val==null)
		{
			return "";
		}
		FollowLeadsStatus status=valueOf(val);
		if(status==null)
		{
			return "";
		}
		return status.getName();
	}
	
	
	
}
